package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: shikong
 * @Date: 2020/8/6 13:40
 */

// http://localhost:3355/config/client/getval
// curl -X POST "http://localhost:3366/actuator/refresh"

@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${info.profile}")
    private String val;

    @GetMapping("/config/client/getval")
    public String getVal(){

        return val;
    }

}
